import axios from '@/libs/request/axios'
////查询凭证原子
export function list(query,path) {
    return axios.request({
        url: `/${path}/voucherAtom/list`,
        method: 'post',
        data: query
    });
}

//新增凭证原子
export function addAtom(atom,path) {
    return axios.request({
        url: `/${path}/voucherAtom/addVoucherAtom`,
        method: 'post',
        data: atom
    });
}
//修改凭证原子
export function modifyAtom(atom,path) {
    return axios.request({
        url: `/${path}/voucherAtom/modifyVoucherAtom`,
        method: 'post',
        data: atom
    });
}
//删除凭证原子
export function deleteAtom(id,path) {
    return axios.request({
        url: `/${path}/voucherAtom/delVoucherAtom/${id}`,
        method: 'delete'
    });
}

export function queryAtomsByBizType(bizType,path='') {
    return axios.request({
        url: `/${path}/voucherAtom/queryAtomsByBizType/${bizType}`,
        method: 'post',
    });
}
